package com.thyme.content.feignclient;

import com.thyme.content.configuration.UserCenterFeignConfiguration;
import com.thyme.content.domain.dto.user.UserDTO;
import com.thyme.content.feignclient.fallback.UserCenterFeignClientFallback;
import com.thyme.content.feignclient.fallbackfactory.UserCenterFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author thyme
 * @ClassName CenterUserFeignClient
 * @Description TODO
 * @Date 2019/11/6 16:52
 */
//@FeignClient(name = "center-user",configuration = UserCenterFeignConfiguration.class)
@FeignClient(name = "center-user",
        //fallback = UserCenterFeignClientFallback.class,
        fallbackFactory = UserCenterFeignClientFallbackFactory.class)
public interface CenterUserFeignClient {

    @GetMapping("/users/{id}")
    UserDTO findById(@PathVariable Integer id);
}
